package com.itheima.mywriter;


import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;

/**
 * @Author 王加鑫
 * @Date 2021/5/20 10:40
 * @Version 1.0
 */
public class Demo02 {
    public static void main(String[] args) throws IOException {
        FileWriter writer = new FileWriter("day13_字符流/bbb.txt");
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入用户名:");
        String name = sc.next();
        System.out.println("请输入密码:");
        String password = sc.next();
        writer.write(name);
        writer.write(System.lineSeparator());
        writer.write(password);
        writer.flush();
        writer.close();
    }
}
